home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / X11 / XmbTextListToTextProperty.z / XmbTextListToTextProperty
Encoding:
Text File  |  2002-10-03  |  14.2 KB  |  274 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmbbbbTTTTeeeexxxxttttLLLLiiiissssttttTTTTooooTTTTeeeexxxxttttPPPPrrrrooooppppeeeerrrrttttyyyy((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXmmmmbbbbTTTTeeeexxxxttttLLLLiiiissssttttTTTTooooTTTTeeeexxxxttttPPPPrrrrooooppppeeeerrrrttttyyyy((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XmbTextListToTextProperty, XwcTextListToTextProperty,
  10.           XmbTextPropertyToTextList, XwcTextPropertyToTextList,
  11.           XwcFreeStringList, XDefaultString - convert text lists and
  12.           text property structures
  13.  
  14.      SSSSYYYYNNNNTTTTAAAAXXXX
  15.           int XmbTextListToTextProperty(_d_i_s_p_l_a_y, _l_i_s_t, _c_o_u_n_t, _s_t_y_l_e,
  16.           _t_e_x_t__p_r_o_p__r_e_t_u_r_n)
  17.                 Display *_d_i_s_p_l_a_y;
  18.                 char **_l_i_s_t;
  19.                 int _c_o_u_n_t;
  20.                 XICCEncodingStyle _s_t_y_l_e;
  21.                 XTextProperty *_t_e_x_t__p_r_o_p__r_e_t_u_r_n;
  22.  
  23.           int XwcTextListToTextProperty(_d_i_s_p_l_a_y, _l_i_s_t, _c_o_u_n_t, _s_t_y_l_e,
  24.           _t_e_x_t__p_r_o_p__r_e_t_u_r_n)
  25.                 Display *_d_i_s_p_l_a_y;
  26.                 wchar_t **_l_i_s_t;
  27.                 int _c_o_u_n_t;
  28.                 XICCEncodingStyle _s_t_y_l_e;
  29.                 XTextProperty *_t_e_x_t__p_r_o_p__r_e_t_u_r_n;
  30.  
  31.           int XmbTextPropertyToTextList(_d_i_s_p_l_a_y, _t_e_x_t__p_r_o_p,
  32.           _l_i_s_t__r_e_t_u_r_n, _c_o_u_n_t__r_e_t_u_r_n)
  33.                 Display *_d_i_s_p_l_a_y;
  34.                 XTextProperty *_t_e_x_t__p_r_o_p;
  35.                 char ***_l_i_s_t__r_e_t_u_r_n;
  36.                 int *_c_o_u_n_t__r_e_t_u_r_n;
  37.  
  38.           int XwcTextPropertyToTextList(_d_i_s_p_l_a_y, _t_e_x_t__p_r_o_p,
  39.           _l_i_s_t__r_e_t_u_r_n, _c_o_u_n_t__r_e_t_u_r_n)
  40.                 Display *_d_i_s_p_l_a_y;
  41.                 XTextProperty *_t_e_x_t__p_r_o_p;
  42.                 wchar_t ***_l_i_s_t__r_e_t_u_r_n;
  43.                 int *_c_o_u_n_t__r_e_t_u_r_n;
  44.  
  45.           void XwcFreeStringList(_l_i_s_t)
  46.                 wchar_t **_l_i_s_t;
  47.  
  48.           char *XDefaultString()
  49.  
  50.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  51.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  52.  
  53.           _l_i_s_t      Specifies a list of null-terminated character
  54.                     strings.
  55.  
  56.           _c_o_u_n_t     Specifies the number of strings specified.
  57.  
  58.           _s_t_y_l_e     Specifies the manner in which the property is
  59.                     encoded.
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmbbbbTTTTeeeexxxxttttLLLLiiiissssttttTTTTooooTTTTeeeexxxxttttPPPPrrrrooooppppeeeerrrrttttyyyy((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXmmmmbbbbTTTTeeeexxxxttttLLLLiiiissssttttTTTTooooTTTTeeeexxxxttttPPPPrrrrooooppppeeeerrrrttttyyyy((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           _t_e_x_t__p_r_o_p__r_e_t_u_r_n
  75.                     Returns the _X_T_e_x_t_P_r_o_p_e_r_t_y structure.
  76.  
  77.           _t_e_x_t__p_r_o_p Specifies the _X_T_e_x_t_P_r_o_p_e_r_t_y structure to be used.
  78.  
  79.           _l_i_s_t__r_e_t_u_r_n
  80.                     Returns a list of null-terminated character
  81.                     strings.
  82.  
  83.           _c_o_u_n_t__r_e_t_u_r_n
  84.                     Returns the number of strings.
  85.  
  86.           _l_i_s_t      Specifies the list of strings to be freed.
  87.  
  88.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  89.           The _X_m_b_T_e_x_t_L_i_s_t_T_o_T_e_x_t_P_r_o_p_e_r_t_y and _X_w_c_T_e_x_t_L_i_s_t_T_o_T_e_x_t_P_r_o_p_e_r_t_y
  90.           functions set the specified _X_T_e_x_t_P_r_o_p_e_r_t_y value to a set of
  91.           null-separated elements representing the concatenation of
  92.           the specified list of null-terminated text strings.  A final
  93.           terminating null is stored at the end of the value field of
  94.           text_prop_return but is not included in the nitems member.
  95.  
  96.           The functions set the encoding field of text_prop_return to
  97.           an _A_t_o_m for the specified display naming the encoding
  98.           determined by the specified style and convert the specified
  99.           text list to this encoding for storage in the
  100.           text_prop_return value field.  If the style _X_S_t_r_i_n_g_S_t_y_l_e or
  101.           _X_C_o_m_p_o_u_n_d_T_e_x_t_S_t_y_l_e is specified, this encoding is ``STRING''
  102.           or ``COMPOUND_TEXT'', respectively.  If the style _X_T_e_x_t_S_t_y_l_e
  103.           is specified, this encoding is the encoding of the current
  104.           locale.  If the style _X_S_t_d_I_C_C_T_e_x_t_S_t_y_l_e is specified, this
  105.           encoding is ``STRING'' if the text is fully convertible to
  106.           STRING, else ``COMPOUND_TEXT''.
  107.  
  108.           If insufficient memory is available for the new value
  109.           string, the functions return _X_N_o_M_e_m_o_r_y.  If the current
  110.           locale is not supported, the functions return
  111.           _X_L_o_c_a_l_e_N_o_t_S_u_p_p_o_r_t_e_d.  In both of these error cases, the
  112.           functions do not set text_prop_return.
  113.  
  114.           To determine if the functions are guaranteed not to return
  115.           _X_L_o_c_a_l_e_N_o_t_S_u_p_p_o_r_t_e_d, use _X_S_u_p_p_o_r_t_s_L_o_c_a_l_e.
  116.  
  117.           If the supplied text is not fully convertible to the
  118.           specified encoding, the functions return the number of
  119.           unconvertible characters.  Each unconvertible character is
  120.           converted to an implementation-defined and encoding-specific
  121.           default string.  Otherwise, the functions return _S_u_c_c_e_s_s.
  122.           Note that full convertibility to all styles except
  123.           _X_S_t_r_i_n_g_S_t_y_l_e is guaranteed.
  124.  
  125.           To free the storage for the value field, use _X_F_r_e_e.
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXmmmmbbbbTTTTeeeexxxxttttLLLLiiiissssttttTTTTooooTTTTeeeexxxxttttPPPPrrrrooooppppeeeerrrrttttyyyy((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXmmmmbbbbTTTTeeeexxxxttttLLLLiiiissssttttTTTTooooTTTTeeeexxxxttttPPPPrrrrooooppppeeeerrrrttttyyyy((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           The _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t and _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t
  141.           functions return a list of text strings in the current
  142.           locale representing the null-separated elements of the
  143.           specified _X_T_e_x_t_P_r_o_p_e_r_t_y structure.  The data in text_prop
  144.           must be format 8.
  145.  
  146.           Multiple elements of the property (for example, the strings
  147.           in a disjoint text selection) are separated by a null byte.
  148.           The contents of the property are not required to be null-
  149.           terminated; any terminating null should not be included in
  150.           text_prop.nitems.
  151.  
  152.           If insufficient memory is available for the list and its
  153.           elements, _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t and
  154.           _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t return _X_N_o_M_e_m_o_r_y.  If the current
  155.           locale is not supported, the functions return
  156.           _X_L_o_c_a_l_e_N_o_t_S_u_p_p_o_r_t_e_d.  Otherwise, if the encoding field of
  157.           text_prop is not convertible to the encoding of the current
  158.           locale, the functions return _X_C_o_n_v_e_r_t_e_r_N_o_t_F_o_u_n_d.  For
  159.           supported locales, existence of a converter from
  160.           COMPOUND_TEXT, STRING or the encoding of the current locale
  161.           is guaranteed if _X_S_u_p_p_o_r_t_s_L_o_c_a_l_e returns _T_r_u_e for the
  162.           current locale (but the actual text may contain
  163.           unconvertible characters).  Conversion of other encodings is
  164.           implementation-dependent.  In all of these error cases, the
  165.           functions do not set any return values.
  166.  
  167.           Otherwise, _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t and
  168.           _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t return the list of null-terminated
  169.           text strings to list_return and the number of text strings
  170.           to count_return.
  171.  
  172.           If the value field of text_prop is not fully convertible to
  173.           the encoding of the current locale, the functions return the
  174.           number of unconvertible characters.  Each unconvertible
  175.           character is converted to a string in the current locale
  176.           that is specific to the current locale.  To obtain the value
  177.           of this string, use _X_D_e_f_a_u_l_t_S_t_r_i_n_g.  Otherwise,
  178.           _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t and _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t
  179.           return _S_u_c_c_e_s_s.
  180.  
  181.           To free the storage for the list and its contents returned
  182.           by _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t, use _X_F_r_e_e_S_t_r_i_n_g_L_i_s_t.  To free
  183.           the storage for the list and its contents returned by
  184.           _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t, use _X_w_c_F_r_e_e_S_t_r_i_n_g_L_i_s_t.
  185.  
  186.           The _X_w_c_F_r_e_e_S_t_r_i_n_g_L_i_s_t function frees memory allocated by
  187.           _X_w_c_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t.
  188.  
  189.           The _X_D_e_f_a_u_l_t_S_t_r_i_n_g function returns the default string used
  190.           by Xlib for text conversion (for example, in
  191.           _X_m_b_T_e_x_t_P_r_o_p_e_r_t_y_T_o_T_e_x_t_L_i_s_t).  The default string is the
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 10/3/02)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXmmmmbbbbTTTTeeeexxxxttttLLLLiiiissssttttTTTTooooTTTTeeeexxxxttttPPPPrrrrooooppppeeeerrrrttttyyyy((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXmmmmbbbbTTTTeeeexxxxttttLLLLiiiissssttttTTTTooooTTTTeeeexxxxttttPPPPrrrrooooppppeeeerrrrttttyyyy((((3333XXXX11111111))))
  203.  
  204.  
  205.  
  206.           string in the current locale that is output when an
  207.           unconvertible character is found during text conversion.  If
  208.           the string returned by _X_D_e_f_a_u_l_t_S_t_r_i_n_g is the empty string
  209.           (""), no character is output in the converted text.
  210.           _X_D_e_f_a_u_l_t_S_t_r_i_n_g does not return NULL.
  211.  
  212.           The string returned by _X_D_e_f_a_u_l_t_S_t_r_i_n_g is independent of the
  213.           default string for text drawing; see _X_C_r_e_a_t_e_F_o_n_t_S_e_t to
  214.           obtain the default string for an _X_F_o_n_t_S_e_t.
  215.  
  216.           The behavior when an invalid codepoint is supplied to any
  217.           Xlib function is undefined.
  218.  
  219.           The returned string is null-terminated.  It is owned by Xlib
  220.           and should not be modified or freed by the client.  It may
  221.           be freed after the current locale is changed.  Until freed,
  222.           it will not be modified by Xlib.
  223.  
  224.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  225.           The _X_T_e_x_t_P_r_o_p_e_r_t_y structure contains:
  226.  
  227.           typedef struct {
  228.                unsigned char *value;/* property data */
  229.                Atom encoding;      /* type of property */
  230.                int format;         /* 8, 16, or 32 */
  231.                unsigned long nitems;/* number of items in value */
  232.           } XTextProperty;
  233.  
  234.           The _X_I_C_C_E_n_c_o_d_i_n_g_S_t_y_l_e structure contains:
  235.  
  236.           #define
  237.                     _X_N_o_M_e_m_o_r_y
  238.                                            -1
  239.           #define
  240.                     _X_L_o_c_a_l_e_N_o_t_S_u_p_p_o_r_t_e_d
  241.                                            -2
  242.           #define
  243.                     _X_C_o_n_v_e_r_t_e_r_N_o_t_F_o_u_n_d
  244.                                            -3
  245.           typedef enum {
  246.                XStringStyle,       /* STRING */
  247.                XCompoundTextStyle, /* COMPOUND_TEXT */
  248.                XTextStyle,         /* text in owner's encoding (current locale) */
  249.                XStdICCTextStyle    /* STRING, else COMPOUND_TEXT */
  250.           } XICCEncodingStyle;
  251.  
  252.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  253.           XSetTextProperty(3X11), XStringListToTextProperty(3X11)
  254.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.      Page 4                                          (printed 10/3/02)
  268.  
  269.  
  270.  
  271.